package com.smedi.ismedi.progress.core.port.adapter.persistence.mybatis.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProjectBriefReport;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProjectBriefReportDetail;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProjectDateil;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.VersionDetail;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProgressEntity;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProjectBriefReportDetailEntity;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProjectBriefReportEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 进度计划表Mapper
 *
 * @author pengyan
 * @date 2021/08/28
 */
@Mapper
public interface ProjectBriefReportMapper extends BaseMapper<ProjectBriefReportEntity> {

    /**
    * 查询项目简报列表
    * @param page
    * @param lambdaQueryWrapper
    * @return java.util.List<com.smedi.ismedi.progress.core.domain.aggregatemodel.ProjectBriefReport>
    * @date 2022/10/12 18:04
    */
    Page<ProjectBriefReport> getProjectBriefReportList(Page<ProjectBriefReportEntity> page,@Param(Constants.WRAPPER) LambdaQueryWrapper<ProjectBriefReportEntity> lambdaQueryWrapper);

    /**
    * 查询项目简报详情
    * @param id
    * @return java.util.List<com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProjectBriefReportDetailEntity>
    * @date 2022/10/13 15:31
    */
    List<ProjectBriefReportDetail> getProjectBriefReportDetail(Long id);

    List<ProjectBriefReportDetail> getProjectBriefReportDetailAll(List<Long> ids);

    /**
    * 插入关联表中
    * @param briefReportId
    * @param briefReportDetailId
    * @date 2022/10/15 16:12
    */
   void insertAssociation(Long briefReportId,Long briefReportDetailId);

   /**
   * 查询对应项目简报的 发布时间
   * @param ids
   * @return java.util.List<com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProjectBriefReportEntity>
   * @date 2022/11/10 11:20
   */
    List<ProjectBriefReportDetail> geProjectRecordTime(List<Long> ids);
}